{extend name="base"}
{block name="title"}奖励详情{/block}
{block name="head"}
<style>
    .tab-content dl dt {width:70px;}
    .tab-content dl dd {margin-left:70px;}
    .mainbody{padding:0;margin:0;}
    textarea {max-width:360px; max-height:65px; width:360px; height:65px;}
</style>
<script>
    $(function () {
        $("#GAME_TYPE input[type='radio']").click(function () {
            var id = "{$row.GameType ?? 0}";
            console.log(id)
            var _this2 = $(this);
            var idx2 = _this2.attr('id');
            console.log("click", idx2);
            if (idx2 != id) {        // 通知
              $(".RoomCardNum").attr("value",0)
              $(".ScoreNum").attr("value",0)

            }else{
                $(".RoomCardNum").attr("value","{$row.RoomCardNum ?? 0}")
                $(".ScoreNum").attr("value","{$row.ScoreNum ?? 0}")
            }
        });
            
        $("#msgstr").click(function(){
            var kind =$("#kind:checked").data("val")??"未选择游戏--";
            var TableType =$("#TableType").val();
            var TableNumb =$("#TableNumb").val();
            var str = kind+'['+TableType+'局]玩法完整打满'+TableNumb+'场';
            $(this).html(str);
        })
    });
</script>
{/block}
{block name="body"}
<body class="mainbody">
<!--内容-->
<!--
{:var_dump($row)}
-->
<div class="tab-content" style="border:1px solid #eee;">
    <form>
        <dl id="ChannelType">
            <dt>渠道选择：</dt>
            <dd>
                <div class="rule-multi-radio">
        <span style="display: none;">

          {foreach name="CHANNEL" item="val"}
          <input type="radio" name="channel" value="{$val.ID}"   {eq name="$Channels" value="$val.ID"} checked{/eq} /><label>[{$val.ID}]{$val.Name}</label>
          {/foreach}
        </span>
                </div>
                <span class="Validform_checktip">*</span>
            </dd>
        </dl>
        <dl id="KindType">
            <dt>游戏选择：</dt>
            <dd>
                <div class="rule-multi-radio">
        <span style="display: none;">

          {foreach name="KINDS" item="val"}
          <input type="radio" name="kind" id="kind" value="{$key}" data-val="{$val}"  {eq name="$kindid" value="$key" data-val="$val"} checked{/eq} /><label>[{$key}]{$val}</label>
          {/foreach}
        </span>
                </div>
                <span class="Validform_checktip">*</span>
            </dd>
        </dl>
        <dl>
            <dt>奖励类型：</dt>
            <dd id="GAME_TYPE">
                <div class="rule-multi-radio">
                    <span style="display: none;">
                    {foreach name="GAME_TYPE" item="val"}
                      <input type="radio" id="{$key}" name="gametype" value="{$key}"{notempty name="$GameType"}{eq name="$gametypes" value="$key"} checked{/eq}{/notempty} /><label>[{$key}]{$val}</label>
                    {/foreach}
                    </span>
                </div>
                <span id="GameType" style="margin-left:10px;vertical-align:bottom;" >
          {volist name="GameType" id="v"}
              {$v}:<input type="text"   name="{$key}" class="input small {$key}" data-old="{$row[$key]??0}" value="{$row[$key]??0}">
          {/volist}
        </span>
                <span class="Validform_checktip">*</span>
            </dd>
        </dl>
        <dl>
            <dt>游戏局数：</dt>
            <dd>
                <input type="text" name="TableType" id="TableType" class="input small" value="{$row.TableType ?? 0}">
                <span class="Validform_checktip">* 大于0,<span style="color: red;">注:请填写对应游戏创建房间面板的局数</span></span>
            </dd>
        </dl>
        <dl>
            <dt>任务局数：</dt>
            <dd>
                <input type="text" name="TableNumb" id="TableNumb" class="input small" value="{$row.TableNumb ?? 0}">
                <span class="Validform_checktip">* 大于0,例:5局,10局,15局</span>
            </dd>
        </dl>
        <dl>
            <dt>规则描述：</dt>
            <dd>
                <textarea class="input" name="str" id="msgstr">{$row.str|default='例:双扣[4局]玩法完整打满5场'|htmlentities}</textarea>
                <span class="Validform_checktip">* 最长125字(点击文本框会自动写入选项，请仔细核对)</span>
            </dd>
        </dl>
        <dl>
            <dt>启用状态：</dt>
            <dd>
                <div class="rule-single-checkbox">
                    <input type="checkbox" name="Sate" value="1"{notempty name="row.Sate"}{eq name="row.Sate" value="1"} checked{/eq}{/notempty} />
                </div>
                <span class="Validform_checktip">* 是否启用该条规则</span>
            </dd>
        </dl>
        <dl><dt>创建时间：</dt><dd>{$row.Addtime??''}</dd></dl>
    </form>
</div>
<!--/内容-->

</body>
{/block}